<?php

namespace App\Http\Controllers\Api\V1\Resources;

use Illuminate\Http\Resources\Json\JsonResource;
use Zhuzhichao\BankCardInfo\BankCard;

class CartResource extends JsonResource
{
    public function toArray($request)
    {
    	$data = $this->resource;
        return [
	        'id' => (int)$data->id,
	        'sku' => new ProductSkuResource($this->sku),
	        'product' =>  new ProductResource($this->product),
	        'number' => $data->number
        ];
    }
}
